package gestorcondominio

class AdminFilters {
	def filters = {
		adminOnly(controller:'*',
				action:"(create|edit|update|delete|save)") {
					before = {
						if(!session?.user?.admin){
							flash.message = "Acceso solo para administradores"
							redirect(controller:"cuotas", action:"list")
							return false
						}
					}
				}
	}
}